package com.zg.nacos.domain.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/7/1 16:34
 */

@Data
public class ServiceEditReq extends NacosReq{

    @ApiModelProperty(value = "服务名称", required = true)
    @NotEmpty(message = "服务名称不能为空")
    private String name;

    @ApiModelProperty(value = "分组名称", required = true)
    @NotEmpty(message = "分组名称不能为空")
    private String groupName;

    @ApiModelProperty(value = "保护阈值", required = true)
//    @NotNull(message = "保护阈值不能为空")
    private Integer protectThreshold;

    @ApiModelProperty(value = "元数据", required = true)
    @NotEmpty(message = "元数据不能为空")
    private Map metadata;

    @ApiModelProperty(value = "命名空间", required = true)
    @NotEmpty(message = "命名空间不能为空")
    private String namespaceId;

    private String selector;
}
